package com.group.eams.service.impl;

import com.group.eams.entity.Student;
import com.group.eams.mapper.StudentMapper;
import com.group.eams.service.IStudentService;
import com.group.eams.test.StudentTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Doctor Who on 2016/11/2.
 */
@Service
public class StudentServiceImpl implements IStudentService {
    private StudentMapper studentMapper;

    @Autowired
    public StudentServiceImpl(StudentMapper studentMapper){
        this.studentMapper = studentMapper;
    }

    @Override
    public List<Student> getStudentList(String name){
        return studentMapper.getStudentList(name);
    }

    @Override
    public boolean addStudent(Student student){
        return studentMapper.addStudent(student);
    }

    @Override
    public boolean delStudent(Student student){
        return studentMapper.delStudent(student);
    }

    @Override
    public boolean updateStudent(Student student){
        return studentMapper.updateStudent(student);
    }

    @Override
    public boolean receiveStudent(Student student){return studentMapper.receiveStudent(student);}

    @Override
    public List<Student> getAllStudentList(){
        return studentMapper.getAllStudentList();
    }

    @Override
    public Student getStudent(Integer id){
        return studentMapper.getStudent(id);
    }
}
